package com.mpdbailey.cleverdicandroid;

import com.google.ads.AdRequest;
import com.google.ads.AdView;
import com.pigdogbay.androidutils.utils.ActivityUtils;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.view.View;

public class ActivitiesHelper {
	public static void removeAds(Activity activity)
	{
		View ad = (View) activity.findViewById(R.id.adView);
		if (ad!=null)
		{
			ad.setEnabled(false);
			ad.setVisibility(View.GONE);
		}
	}
	public static void loadAd(Activity activity)
	{
		AdView ad = (AdView) activity.findViewById(R.id.adView);
		if (ad!=null)
		{
			AdRequest adRequest = new AdRequest();
			adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
			adRequest.addTestDevice(activity.getString(R.string.code_test_device_1_id));
			adRequest.addTestDevice(activity.getString(R.string.code_test_device_2_id));
			ad.loadAd(adRequest);
		}
	}
}
